
using FriendStar.Domain.Entity.WareHouse;
using FriendStar.Domain.IRepository.WareHouse;
using FriendStar.Repository.WareHouse;
using System;
using System.Collections.Generic;
using System.Linq;
using SqlSugarRepository;

namespace CopyrightFriendStar.Application.WareHouse
{
    public class CYK_ZD_41_DatStoreHouseApp
    {
        private ICYK_ZD_41_DatStoreHouseRepository service = new CYK_ZD_41_DatStoreHouseRepository();

        public List<CYK_ZD_41_DatStoreHouseEntity> GetList()
        {
            return service.IQueryable().ToList();
        }
        public CYK_ZD_41_DatStoreHouseEntity GetForm(string keyValue)
        {
            return service.FindEntity(keyValue);
        }
        public void DeleteForm(string keyValue)
        {
            
        }
        public void SubmitForm(CYK_ZD_41_DatStoreHouseEntity CYK_ZD_41_DatStoreHouseEntity, string keyValue)
        {
            if (!string.IsNullOrEmpty(keyValue))
            {
                service.Update(CYK_ZD_41_DatStoreHouseEntity);
            }
            else
            {
                service.Insert(CYK_ZD_41_DatStoreHouseEntity);
            }
        }
    }
}
